home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / f90 / eqv.z / eqv
Encoding:
Text File  |  1998-10-30  |  4.0 KB  |  101 lines

  1. EQV(3M)                                                Last changed: 1-6-98
  2.  
  3.  
  4. NNAAMMEE
  5.      EEQQVV - Computes logical equivalence
  6.  
  7. SSYYNNOOPPSSIISS
  8.      EEQQVV (([II==]_i,,[JJ==]_j))
  9.  
  10. IIMMPPLLEEMMEENNTTAATTIIOONN
  11.      UNICOS, UNICOS/mk, and IRIX systems
  12.  
  13. SSTTAANNDDAARRDDSS
  14.      Compiler extension to Fortran 90
  15.  
  16. DDEESSCCRRIIPPTTIIOONN
  17.      EEQQVV is an elemental function for the CF90 compiler.
  18.  
  19.      _a_r_g, _i, and _j can be of type Boolean, integer, real, logical, or Cray
  20.      pointer.
  21.  
  22. NNOOTTEESS
  23.      EEQQVV is an outmoded routine for the CF90 compiler.  Refer to the
  24.      _F_o_r_t_r_a_n _L_a_n_g_u_a_g_e _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, _V_o_l_u_m_e _3, publication SR-3905, for
  25.      information about outmoded features and their preferred standard
  26.      alternatives.
  27.  
  28.      The name of this intrinsic cannot be passed as an argument.
  29.  
  30. CCAAUUTTIIOONNSS
  31.      Unexpected results can occur when Boolean functions are declared
  32.      external and then used with logical arguments.  The external Boolean
  33.      functions always treat their arguments as type Boolean and return a
  34.      Boolean result.  When given two arguments of type logical, EEQQVV
  35.      computes a logical equivalence and returns a logical result on UNICOS
  36.      and UNICOS/mk systems.  On IRIX systems, they return an integer
  37.      result.
  38.  
  39. RREETTUURRNN VVAALLUUEESS
  40.      When given two arguments of type Boolean, real, integer, or pointer,
  41.      EEQQVV computes a bit-wise logical equivalence and returns a Boolean
  42.      result.  No type conversion occurs.
  43.  
  44.      The following tables show both the logical equivalence and bit-wise
  45.      logical equivalence:
  46.  
  47.      -----------------------------------------------------------------
  48.         Logical        Logical          (Logical Variable 1) EEQQVV
  49.       Variable 1     Variable 2           (Logical Variable 2)
  50.      -----------------------------------------------------------------
  51.            T              T                         T
  52.            T              F                         F
  53.            F              T                         F
  54.            F              F                         T
  55.      -----------------------------------------------------------------
  56.  
  57.  
  58.      --------------------------------------------------------------
  59.         Bit of        Bit of           (Bit of Variable 1) EEQQVV
  60.       Variable 1    Variable 2           (Bit of Variable 2)
  61.      --------------------------------------------------------------
  62.           1             1                        1
  63.           1             0                        0
  64.           0             1                        0
  65.           0             0                        1
  66.      --------------------------------------------------------------
  67.  
  68. EEXXAAMMPPLLEESS
  69.      The following section of Fortran code shows the EEQQVV function used with
  70.      two arguments of type logical:
  71.  
  72.           LOGICAL L1, L2, L3
  73.           ...
  74.           L3 = EQV(L1,L2)
  75.  
  76.      The following section of Fortran code shows the EEQQVV function used with
  77.      two arguments of type integer.  The bit patterns of the arguments and
  78.      result are also given.  For clarity, only the rightmost 8 bits are
  79.      shown.
  80.  
  81. INTEGER I1, I2, I3
  82. I1 = 12
  83. I2 = 10
  84. ...
  85. I3 = EQV(I1,I2)
  86.  
  87.        -------------------------------     -------------------------------
  88.       | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 |   | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 |
  89.        -------------------------------     -------------------------------
  90.                     I1                              I2
  91.  
  92.                      -------------------------------
  93.                     | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 1 |
  94.                      -------------------------------
  95.                                      I3
  96.  
  97. SSEEEE AALLSSOO
  98.      _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-2138, for the
  99.      printed version of this man page.
  100.  
  101.